#include "TaskBase.h"
#include "Schedule.h"

bool CTaskBase::IsFinished() const
{
    return State.load()==EState::Finished;
}

bool CTaskBase::IsFailed() const
{
    return State.load()==EState::Failed;
}

bool CTaskBase::IsJustCreated() const
{
    return State.load()==EState::JustCreated;
}

void CTaskBase::AddToSchedule()
{
    //assert(State.load()==EState::JustCreated);
    Schedule->AddTask(AsShared());
}
